<!DOCTYPE html>
<html>
<head>
    <title>订单管理:发货管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="2">
                    <i-input v-model="q.pname" @on-enter="query" placeholder="产品名称"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.phone" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.orderno" @on-enter="query" placeholder="订单编号"/>
                </i-col>
                <i-col span="2">
                    <i-select v-model="q.type" placeholder="订单类型">
                        <i-option value="1">商城购买订单</i-option>
                        <i-option value="2">SPC兑换订单</i-option>
                        <i-option value="3">奖金兑换订单</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                    <Date-picker type="date" placement="bottom-end" v-model="q.date" placeholder="选择日期"
                       format="yyyy-MM-dd"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("logistics:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("logistics:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("logistics:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("logistics:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="logistics" :rules="ruleValidate" :label-width="80">
            <Form-item label="物流编号" prop="logisticsNo">
                <i-input v-model="logistics.logisticsNo" placeholder="物流编号" readonly="true"/>
            </Form-item>
            <Form-item label="物流名称" prop="name">
                <i-input v-model="logistics.name" placeholder="物流名称"/>
            </Form-item>
            <Form-item label="订单编号" prop="orderno">
                <i-input v-model="logistics.orderno" placeholder="定单编号"/>
            </Form-item>
            <Form-item label="状态" prop="statu">
                <i-select v-model="logistics.statu" placeholder="订单状态">
                    <i-option :value="1">已发货</i-option>
                    <i-option :value="2">已收货</i-option>
                </i-select>
            </Form-item>
            <Form-item label="产品编号" prop="pid">
                <i-input v-model="logistics.pid" placeholder="产品编号"/>
            </Form-item>
            <Form-item label="产品名称" prop="pname">
                <i-input v-model="logistics.pname" placeholder="产品名称"/>
            </Form-item>
            <Form-item label="数量" prop="num">
                <i-input v-model="logistics.num" placeholder="数量"/>
            </Form-item>
            <Form-item label="用户编号" prop="userId">
                <i-input v-model="logistics.userId" placeholder="用户编号"/>
            </Form-item>
            <Form-item label="用户名" prop="userName">
                <i-input v-model="logistics.userName" placeholder="用户名"/>
            </Form-item>
            <Form-item label="手机" prop="phone">
                <i-input v-model="logistics.phone" placeholder="手机"/>
            </Form-item>
            <Form-item label="备注" prop="remark">
                <i-input v-model="logistics.remark" placeholder="备注" readonly/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/order/logistics.js?_${date.systemTime}"></script>
</body>
</html>